const { contextBridge, ipcRenderer } = require('electron')

contextBridge.exposeInMainWorld('electronAPI', {
  // 通知主线程退出
  shutdown: () => ipcRenderer.send('window-close'),
  shutdownSetting: () => ipcRenderer.send('setting-close'),
  saveConfig: (e) => ipcRenderer.invoke('save-config',e),
  loadConfig: () => ipcRenderer.invoke('load-config'),
  resetConfig: () => ipcRenderer.invoke('reset-config')
})